require 'middleclass'
require 'SpriteHelper'

Particle = class('Particle')
 --sheets   
Particle.static.imageSheet = graphics.newImageSheet( SpriteHelper.pathLevel, SpriteHelper.optionsLevel )

function Particle.static.getParticle(x, y, alpha, size)
    local particle = display.newImageRect(Particle.imageSheet,SpriteHelper.sheets.x_smoke, size, size)
    particle.x = x
    particle.y = y
    particle.alpha = alpha
    --particle.blendMode = "add"
    
    function removeListener()
        particle:removeSelf()
    end
    
    timer.performWithDelay(600, removeListener )    
    
    return particle
end

